Repository navigation
test(server): tracked-folder tests pass on Windows - #41028
pauldupuyjr wants to merge 1 commit into
Conversation
Two ProjectService tests built their expected tracked-folder paths with hard-coded forward slashes. The service resolves each folder to native separators, so on Windows the paths it returns did not deep-equal the expected ones. Build the expected paths with Path.join instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
Two tests in
apps/server/src/project/ProjectService.test.tsfail on Windows: "keeps a valid tracked folder list and refuses the others" and "keeps a folder added while a scan of the project folder waited to commit". They build their expected tracked-folder paths with hard-coded forward slashes, such as${work}/api. ProjectService resolves each tracked folder withpath.resolve, so on Windows it returnsC:\...\api, which does not deep-equalC:\.../api. Linux CI passes because the two forms match there.Reproduce on Windows: from
apps/server, runvp test run src/project/ProjectService.test.ts. 2 of 20 tests fail.Change
The two tests build their expected paths with the Effect
Pathservice'spath.join, so the expected paths use the host's separators. Thefolderhelper's parameter is renamed so it no longer shadowspath. The service is unchanged: native separators match how workspace roots are stored.Scope
Test-only fix for tests added in #35925. It needs no issue: the failure is deterministic on any Windows host and the fix changes no product behavior.
Verification
vp test run src/project/ProjectService.test.tsfails 2 of 20 tests before the change and passes 20 of 20 after.vp run check:changedpasses format, lint, knip, typecheck, and tests.Model: Claude Opus 5.5. Harness: Claude Code in T3 Code.